package com.ujs.shc.dao;

import com.ujs.shc.pojo.Purse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface PurseMapper {

    /**
     * 根据用户id获取钱包对象
     * @param uid
     * @return
     */
    public Purse selectPurseByUid(Integer uid);

    /**
     * 插入一个钱包
     * @param purse
     * @return
     */
    public Integer insertPurse(Purse purse);


    /**
     * 充值
     * @param uid
     * @param money
     * @return
     */
    Integer updatePurse(@Param("uid") Integer uid, @Param("money") Float money);

}
